<b id="questionformtitle" style="line-height: 16px;"><?php echo $view->question['question_label'];?></b>
<form method="post" id="questionform">
    <input type="hidden" id="uid" name="uid" value="<?php echo $view->config['user_id'];?>" />
    <input type="hidden" id="key" name="key" value="<?php echo $view->key;?>" />
    <?php if($view->question['media_type'] == "image") { ?>
        <?php if($view->question['picture_url'] != "") { ?>
        <center>
        <?php if($view->question['image_link'] != ""){?>
        <a href="<?php echo $view->question['image_link'];?>" target="_blank">
            <img style="max-width: 360px" src="<?php echo $view->question['picture_url'];?>" />
        </a>
        <?php } else { ?>
            <img style="max-width: 360px" src="<?php echo $view->question['picture_url'];?>" />
        <?php } ?>
        </center>
        <br/><br/>
        <?php } ?>
    <?php } elseif($view->question['media_type'] == "youtube"){ ?>
        <?php if($view->question['video_url'] != "") {?>
            <object width="360" height="202"><param name="movie" value="<?php echo $view->question['video_url'];?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="<?php echo $view->question['video_url'];?>" type="application/x-shockwave-flash" width="360" height="202" allowscriptaccess="always" allowfullscreen="true"></embed></object>
            <br/><br/>
        <?php } ?>
    <?php } ?>
    <input type="hidden" name="data[day_num]" value="<?php echo $_GET['day'];?>" />
    <input type="hidden" name="data[question_day_id]" value="<?php echo $view->question['question_day_id'];?>" />

    <?php if($view->question['question'] != "") {?>
        <?php if($view->question['question_type'] == 1) { ?>
            <?php echo $view->question['question'];?> <br/><br/>
            <?php if($view->question['answer_1'] != "") {?>
            <table border="0" style="margin-top: 4px;">
                <tr>
                    <td style="width: 26px" valign="top">
                        <input type="radio" checked="checked" name="data[answer]" value="1" /> 
                    </td>
                    <td valign="top" style="padding-top: 2px;line-height: 16px;">
                        <?php echo $view->question['answer_1'];?>
                    </td>
                </tr>                
            </table> 
            <?php } ?>
            <?php if($view->question['answer_2'] != "") {?>
            
            <table border="0" style="margin-top: 4px;">
                <tr>
                    <td style="width: 26px" valign="top">
                        <input type="radio" name="data[answer]" value="2" />
                    </td>
                    <td valign="top" style="padding-top: 2px;line-height: 16px;">
                        <?php echo $view->question['answer_2'];?>
                    </td>
                </tr>                
            </table>         
            <?php } ?>
            <?php if($view->question['answer_3'] != "") {?>
            
            <table border="0" style="margin-top: 4px;">
                <tr>
                    <td style="width: 26px" valign="top">
                        <input type="radio" name="data[answer]" value="3" />
                    </td>
                    <td valign="top" style="padding-top: 2px;line-height: 16px;">
                        <?php echo $view->question['answer_3'];?>
                    </td>
                </tr>                
            </table> 
            <?php } ?>
        <?php } elseif($view->question['question_type'] == 2){ ?>
                <?php echo $view->question['question'];?> <br/>
                <input id="id_custom_answer" style="margin-top: 5px; width: 255px;" type="text" name="data[custom_answer]" value="" />
                <br/>
        <?php } ?>
    <?php } ?>
    <br/>
    <table border="0">
        <?php if($view->settings['is_name_and_email'] !== "0"){ ?>
        <tr>
            <td width="80">
                <?php echo $view->t('Email'); ?>
            </td>
            <td>
                <input id="id_email" type="text" name="data[email]" style="width: 170px;" />
            </td>
        </tr>
        <tr>
            <td width="80">
                <?php echo $view->t('Name'); ?>
            </td>
            <td>
                <input id="id_name" type="text" name="data[name]" style="width: 170px;"  />
            </td>
        </tr>
        <?php } ?>
        <tr <?php if(!$view->settings['is_show_custom_text_area']){?> style="display:none;" <?php } ?>>
            <td width="80">
                <?php echo $view->t('Custom text area'); ?>
            </td>
            <td>
                <textarea style="width: 172px;" id="id_custom_text_area" name="data[custom_text_area]"></textarea>
            </td>
        </tr>
        <tr <?php if(!$view->settings['is_newsletter']){?> style="display:none;" <?php } ?>>
            <td width="80">
                &nbsp;
            </td>
            <td>
                <input id="id_newsletter" checked="checked" type="checkbox" name="data[is_newsletter]"  /> <?php echo $view->t('I want to receive newsletters'); ?>
            </td>
        </tr>        
        <tr>
            <td width="80">
                &nbsp;
            </td>
            <td>
                <span class="lightfaceFooter" style="background-color: transparent;border-top: medium none;padding: 0;">
                    <label class="lightfaceblue "><input onclick="webjs.submitQuestion()" type="button" value="<?php echo $view->t("Send");?>"></label>
                </span>
            </td>
        </tr>        
    </table>
    <br clear="both" />
    <div style="float:right;">
        <iframe src="//www.facebook.com/plugins/like.php?href=<?php echo urlencode($view->config['facebooktab_share_url']); ?>&amp;send=false&amp;layout=button_count&amp;width=90&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:20px;vertical-align: middle;" allowTransparency="true"></iframe>
                <a href="javascript:webjs.share();"><img src="<?php echo $view->config['template_url']; ?>layouts/images/facebook_button_<?php echo $view->config['language'];?>.png" style="width: 60px;vertical-align: middle;" /></a>
    </div>

</form>
<br style="clear:both"/>